<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>拉萨市财政局投资评审管理系统  </title>
    <link rel="stylesheet" href="css/style.css">
    <script src="js/jquery-1.10.2.min.js"></script>
</head>
<body>
<!--main-header start-->
<div class="main-header">
    <div class="w-1200 clearfix">
        <div class="header-logo fl"><a href=""><img src="images/logo.png"></a> </div>
        <!--header-person start-->
         <div id="head_login"></div>
    <script type="text/javascript">
      
      $("#head_login").load("login_common.html");
    </script>
        <!--header-person end-->
        <!--header-nav start-->
        <div class="header-nav fr">
            <ul class="nav">
                <li><a href="/sluserindex.html">待审核项目</a> </li>
                <li><a href="/slindexdone.html">已审核项目</a> </li>
                <li><a href="">政策文章</a> </li>
            </ul>
        </div>
        <!--header-nav end-->
    </div>
</div>
<!--main-header end-->
<!--scan-container start-->
<div class="scan-container w-1200">
    <!--scan-step start-->
    <div class="scan-step clearfix">
        <div class="scan-step-hd fl">项目进度</div>
        <div class="scan-step-bd">


            <div class="step-num">
                <span class="circle">1</span>
                <p>资料准备</p>
            </div>
            <div class="step-num">
                <span class="circle">2</span>
                <p>预审中</p>
            </div>
            <div class="step-num">
                <span class="circle">3</span>
                <p>评审中</p>
            </div>
            <div class="step-num">
                <span class="circle">4</span>
                <p>复核中</p>
            </div>
            <div class="step-num">
                <span class="circle">5</span>
                <p>定审中</p>
            </div>
            <div class="step-num">
                <span class="circle">6</span>
                <p>完结</p>
            </div>



        </div>
    </div>
    <!--scan-step end-->
    <!--scan-main start-->
    <div class="scan-main">
        <!--scan-box start-->
        <div id="sm"></div>
        <script>$("#sm").load("common-iteminfo.html")</script>
        <!--scan-box end-->
        <!--scan-box start-->
        <div class="scan-box" id="filebox">
            <script>
                $("#filebox").load("filedetail.html");
            </script>
        </div>
        <!--scan-box end-->
        <!--add-bottom start-->
        <div class="add-bottom" id="shbox">
           
        </div>
        <!--add-bottom end-->
        <!--驳回申请弹窗 start-->
        <link rel="stylesheet" href="js/alert/syalert.min.css">
        <script src="js/alert/syalert.min.js"></script>
        <div class="sy-alert scan-alert animated" sy-enter="zoomIn" sy-leave="zoomOut" sy-type="confirm" sy-mask="true" id="alert1">
            <div class="sy-title">
                请填写项目申请驳回理由
                <div class="scan-alert-close" onClick="syalert.syhide('alert1')"></div>
            </div>
            <div class="scan-alert-content">
                <textarea rows="6" class="txt" id="reason"></textarea>
            </div>
            <div class="scan-alert-bot">
                <button class="login-btn" onclick="reject()">立即驳回</button>
            </div>
        </div>
        <script>
            function ok(id){
                syalert.syhide(id);
            }
        </script>


        <!--驳回申请弹窗 end-->
    </div>
    <!--scan-main end-->
</div>
<!--scan-container end-->
<script type="text/javascript" src="js/auth.js"></script>
<script type="text/javascript">
var id=getQueryString("id");
$.get(HTTP_HOST+"api/Sly/detail?id="+id,function(res){
    
    if (res.code == 200) {
       var  item = res.result;
       console.log(item);

            $("#xmbd").html(item.xmbd);
            $("#xmlxr").html(item.contactor);
            $("#address").html(item.address);
            $("#name").html(item.name);
            $("#type").html(item.type);
            $("#owner").html(item.owner);
            $("#industry").html(item.industry);
            $("#lxwh").html(item.lxnumber);
            $("#yjbh").html(item.yjbh);

            $("#wtdw").html(item.wtdw);
            $("#wtdwlxr").html(item.wtdwcontactor);
            $("#wtdwlxrdh").html(item.wtdwcontactorphone);
            $("#cash").html(item.cash);
            if(item.status == 0){

                var sh = ` <button class="login-btn" onclick="passitem()">审核通过</button>
            <button class="login-btn bor" onClick="syalert.syopen('alert1')">驳回申请</button>`;
            $("#shbox").html(sh);
            }


            var index = getstat(item.status);
            $(".step-num").each(function(k,obj){
                if(k<=index){
                    $(obj).addClass("on");
                }  
            });







            }
     


},'JSON');



function passitem(){

$.post("/api/Sly/passitem?id="+id,function(res){

    if (res.code == 200) {
        alert("操作成功！！！！");
        window.location.reload();
    }


},'JSON');
}

function reject(){

  var reason = $("#reason").val();
  if (reason == null || reason == '') {
    alert("please input reason.");
    return false;
  }
  $.post("/api/Sly/rejectitem?id="+id,{"reason":reason},function(res){

    if (res.code == 200) {
        alert("操作成功！！！！");
        window.location.reload();
    }

},'JSON');




}









</script>
</body>
</html>
